{extend name=".././view/create.html" /}

{block name="form"}
    <div class="layui-fluid" style="text-align: center;">
      <div class="layui-upload-drag" id="upload">
        <i class="layui-icon"></i>
        <p>点击上传，或将文件拖拽到此处</p>
        <div class="layui-hide" id="uploadDemoView">
        </div>
      </div>
    </div>
{/block}

{block name="myjs"}
<script>

layui.use('upload', function(){
  var upload = layui.upload;

  //执行实例
  var uploadInst = upload.render({
    elem: '#upload' //绑定元素
    ,url: "/rongyu/danwei/saveall" //上传接口
    ,async:false
    ,done: function(res){
      layer.msg(res.msg);
    }
    ,data: {
      text: '单位荣誉'
      ,serurl:'rongyu_school'

    }
    ,multiple:true
    ,number:100
    ,acceptMime:'.jpg,.jpeg,.png'
    ,exts:'jpg|jpeg|png'
    ,auto:true
    ,error: function(){
      //请求异常回调
      layer.msg('上传错误');
    }
  });
});

</script>
{/block}

